package com.example.ercmssystem2.service;

import com.example.ercmssystem2.entity.Notification;
import com.example.ercmssystem2.entity.Event;
import com.example.ercmssystem2.entity.User;

import java.util.List;

public interface NotificationService {
    
    // 创建通知
    Notification createNotification(User user, Event event, String title, String message, String type);
    
    // 创建系统通知
    Notification createSystemNotification(User user, String title, String message);
    
    // 创建事件相关通知
    Notification createEventNotification(User user, Event event, String title, String message, String type);
    
    // 批量创建通知
    List<Notification> createBatchNotifications(List<User> users, Event event, String title, String message, String type);
    
    // 获取用户通知
    List<Notification> getUserNotifications(Long userId);
    
    // 获取用户未读通知
    List<Notification> getUserUnreadNotifications(Long userId);
    
    // 获取用户未读通知数量
    Long getUnreadCount(Long userId);
    
    // 标记通知为已读
    Notification markAsRead(Long notificationId);
    
    // 标记用户所有通知为已读
    void markAllAsRead(Long userId);
    
    // 删除通知
    void deleteNotification(Long notificationId);
    
    // 删除旧通知
    void deleteOldNotifications(int daysOld);
    
    // 发送实时通知（WebSocket等）
    void sendRealTimeNotification(User user, String message);
    
    // 发送事件指派通知
    void sendAssignmentNotification(Event event, User handler);
    
    // 发送进度更新通知
    void sendProgressNotification(Event event, String progress);
    
    // 发送升级通知
    void sendEscalationNotification(Event event, String reason);
} 